
var thumbs = 21;
var i_thumb=4;


function change_pic(){
	if (i_thumb > thumbs){
		i_thumb = 1;
	}
	var img = "<img class='round' src='./thumbs/"+i_thumb+".JPG' />";
	
	//Element.Methods.update('img1',img);
	
	$('#img1').href='./large/'+i_thumb+'.JPG';
	i_thumb++;

	if (i_thumb > thumbs){
		i_thumb = 1;
	}
	img = "<img class='round' src='./thumbs/"+i_thumb+".JPG' />";
	
	//Element.Methods.update('img2',img);
	
	$('#img2').href='./large/'+i_thumb+'.JPG';
	i_thumb++;
	
	if (i_thumb > thumbs){
		i_thumb = 1;
	}
	img = "<img class='round' src='./thumbs/"+i_thumb+".JPG' />";
	
	//Element.Methods.update('img3',img);
	
	$('#img3').href='./large/'+i_thumb+'.JPG';
	i_thumb++;		
}

function create_dialog(elem){
	$('#personal_message').remove();
	$('<div id="personal_message">'+elem+"</div>").appendTo('#error_message');
	$("#error").dialog('open');
}
